package com.nuoniu.sibanyun.entity.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;


/**
 * @ClassName VoucherMainBo
 * @Description TODO
 * @Authpr baiqiang
 * @Date 2020/12/24 16:00
 **/
@Data
@ApiModel("单据主表 通用")
public class VoucherMainBo extends BaseEntity {

    @ApiModelProperty(value = "公司id")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "账套id")
    @TableField("account_id")
    private Integer accountId;

    @ApiModelProperty(value = "单据编号")
    @TableField("voucher_code")
    private String voucherCode;

    @ApiModelProperty(value = "单据日期")
    @TableField("voucher_date")
    private LocalDate voucherDate;

    @ApiModelProperty(value = "单据状态")
    @TableField("voucher_state")
    private Integer voucherState;

    @ApiModelProperty(value = "来源单id")
    @TableField("source_voucher_id")
    private Integer sourceVoucherId;

    @ApiModelProperty(value = "来源单据")
    @TableField("source_voucher_type")
    private String sourceVoucherType;

    @ApiModelProperty(value = "总数量")
    @TableField("total_quantity")
    private BigDecimal totalQuantity;

    @ApiModelProperty(value = "累计执行数量")
    @TableField("cum_execute_quantity")
    private BigDecimal cumExecuteQuantity = new BigDecimal(0);


    @ApiModelProperty(value = "累计退货数量（普通退货）")
    @TableField("cum_ret_quantity")
    private BigDecimal cumRetQuantity  = new BigDecimal(0);


    @ApiModelProperty(value = "业务类型")
    @TableField("business_type")
    private Integer businessType;

    @ApiModelProperty(value = "是否是新记录")
    @TableField(exist = false)
    private Boolean isNewMain = false;


}
